<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateUserTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('user', function(Blueprint $table)
		{
			$table->increments('id');
			$table->string('name')->nullable()->default('')->unique('name');
			$table->string('full_name')->nullable()->default('');
			$table->string('title')->nullable()->default('');
			$table->integer('role_type')->nullable()->default(0);
			$table->string('email')->nullable()->default('')->unique();
			$table->string('tel1')->nullable();
			$table->string('tel2')->nullable();
			$table->string('pass')->nullable()->default('');
			$table->string('company')->nullable()->default('');
			$table->string('lastlogin')->nullable()->default('');
			$table->string('zip', 10)->nullable();
			$table->char('gender', 1)->nullable()->default('');
			$table->string('url')->nullable()->default('');
			$table->string('adress')->nullable()->default('');
			$table->string('adress2')->nullable()->default('');
			$table->string('state')->nullable()->default('');
			$table->string('country')->nullable()->default('');
			$table->string('tags')->nullable()->default('');
			$table->string('locale', 6)->nullable()->default('');
			$table->string('avatar')->nullable()->default('');
			$table->string('rate', 10)->nullable();
			$table->rememberToken();
			$table->timestamps();
			$table->softDeletes();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('user');
	}

}
